//package com.itheima.controller.backend.controller;
//
//import com.itheima.pojo.Setmeal;
//import com.itheima.service.ISetmealService;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.ui.Model;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
//import java.util.List;
//
//@RestController
//@RequestMapping("/freemarker")
//public class FreeMarkerController {
//
//    @Autowired
//    private ISetmealService setmealService;
//
//    @GetMapping("/setmeal")
//    public String test(Model model) {
//
//        List<Setmeal> setmealList = setmealService.selectList();
//
//        model.addAttribute("setmealList", setmealList);
//
//        return "mobile_setmeal";
//    }
//
//    @GetMapping("/setmealdetail")
//    public String setmealDetail(Integer id, Model model) {
//        Setmeal setmeal = setmealService.selectDetilesById(id);
//        model.addAttribute("setmeal", setmeal);
//        model.addAttribute("imgUrl", setmeal.getImg());
//        return "mobile_setmeal_detail";
//    }
//}
